<?php
mysql_connect("127.0.0.1","root","sd2013");
mysql_select_db("mathRomp");

//Update user's result in the assignment
//$q1=mysql_query("UPDATE `Assignment` SET results=results+1 WHERE assignmentId=".$_REQUEST['assignmentId']." AND userId=".$_REQUEST['userId']."");
$q1=mysql_query("UPDATE `Assignment` SET results=results+1 WHERE assignmentId=".$_REQUEST['assignmentId']." AND userId=".$_REQUEST['userId']."");
while($g=mysql_fetch_assoc($q1)){
  $output1[]=$g;
}
print(json_encode($output1));

?>